﻿@model Storytelling.Entidades.VTR.Vampiro
@using Storytelling.Entidades;
@using Storytelling.Entidades.VTR
@using Storytelling.Modelos
@using Storytelling.Utils;
@{
    ViewBag.Title = "Visualizar Vampiro";
    Layout = null;

    string heranca = Enumeracao.Rotulo(Model.Cla.Heranca);
    
    ViewBag.CampoUmLabel = "Clã";
    ViewBag.CampoUmDisplay = heranca;
    
    ViewBag.CampoDoisLabel = "Linhagem";
    ViewBag.CampoDoisDisplay = heranca.Equals(Model.Cla.Nome) ? "" : Model.Cla.Nome;

    ViewBag.CampoTresLabel = "Coalizão";
    ViewBag.CampoTresDisplay = Model.Coalizao != null ? Model.Coalizao.Nome : "";

    ViewBag.MoralidadeLabel = "Humanidade";
    ViewBag.FatorLabel = "Potência de Sangue";
    ViewBag.EnergiaLabel = "Pontos de Sangue";
}
<html>
    <head></head>
    <body>
    @Html.Partial("_VisualizarPartial", Model)
    <br />
    <table width="100%">
        <thead>
            <tr>
                <th colspan="2">Disciplinas</th>                    
                <th colspan="2">Devoções</th>
                <th colspan="2">Rituais</th>
            </tr>
        </thead>
        <tbody>
            @Html.LinhasDinamicas(
                @<text>                                        
                    @if (item < Model.Disciplinas.Count)
                    {
                        VampiroDisciplina vampiroDisciplina = Model.Disciplinas.ElementAt(item);
                        <td>@vampiroDisciplina.Disciplina.Nome:</td>
                        <td>@Html.Pontos(vampiroDisciplina.Nivel, 10)</td>
                    }
                    else
                    {
                        <td>_________________________</td>
                        <td>@(new MvcHtmlString("\u25CC\u25CC\u25CC\u25CC\u25CC\u25CC\u25CC\u25CC\u25CC\u25CC"))</td>
                    }
                    @if (item < Model.Devocoes.Count)
                    {
                        <td colspan="2" style="text-align: center">@Model.Devocoes.ElementAt(item).Devocao.Nome</td>
                    }
                    else
                    {
                        <td colspan="2" style="text-align: center">______________________________</td>
                    } 
                    @if (item < Model.Rituais.Count)
                    {
                        <td colspan="2" style="text-align: center">@Model.Rituais.ElementAt(item).Ritual.Nome</td>
                    }
                    else
                    {
                        <td colspan="2" style="text-align: center">______________________________</td>
                    }                                                                                                                                 
                 </text>, Model.Disciplinas.Count, Model.Devocoes.Count, Model.Rituais.Count)
        </tbody>
    </table> 
    </body>
</html>
